<template>
	<m-layout title="反馈中心">
		<m-block gap="24" >
			<textarea v-model="content" class="textarea" auto-height placeholder="请输入您要反馈的内容"
				placeholder-class="placeholder"></textarea>
		</m-block>
		
	<!-- 	<m-block spa="20 0">
			<uploadPhoto v-model="picurl" placeholder="图片信息"></uploadPhoto>
		</m-block> -->
		
		<m-button block  spa="50 0 0" :loading="isLoading" @click="MsgFeedback_SendMsg">提交</m-button>
		<m-button block hollow  spa="20 0 0" @click="Jump('/pagesA/mine/feedback/recode/recode')">反馈记录</m-button>
	</m-layout>
</template>

<script>
	import { Feedback_GetMsg } from '@/api/Users.js'
	import { mapState } from 'vuex'
	export default {
		data() {
			return {
				picurl:[],
				content:'',
				isLoading:false,
			};

		},
		computed: {
			...mapState({
				
			}),
		},
		onShow() {
			this.Feedback_GetMsg()
		},
		methods: {
			async init() {
				
			},
			async Feedback_GetMsg(){
				if(!this.content){
					return this.Toast('请输入您要反馈的内容')
				}
				this.isLoading = true;
				const { success,msg } = await Feedback_GetMsg({
					content:this.content
				})
				this.isLoading = false;
				this.Toast(msg)
				if(success){
					this.content = ''
				}
			},
		},
		onPullDownRefresh() {
			this.init();
		},
		
	}
</script>

<style lang="scss">
	.textarea{
		min-height: 400rpx;
		width: unset;
		font-size: var(--fs_30);
		color: var(--text);
		font-family: PingFang SC;
		font-weight: 400;
	}
	.placeholder{
		font-size: 26rpx;
		font-family: PingFang SC, PingFang SC;
		font-weight: 400;
		color: #999999;
	}
</style>
